Optimal. Leaf size=47 \[ \frac{a (B+C) \sin (c+d x)}{d}+\frac{a B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{1}{2} a x (B+2 C) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.134582, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {4072, 3996, 3787, 2637, 8} \[ \frac{a (B+C) \sin (c+d x)}{d}+\frac{a B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{1}{2} a x (B+2 C) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4072
Rule 3996
Rule 3787
Rule 2637
Rule 8
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^2(c+d x) (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=\frac{a B \cos (c+d x) \sin (c+d x)}{2 d}-\frac{1}{2} \int \cos (c+d x) (-2 a (B+C)-a (B+2 C) \sec (c+d x)) \, dx\\ &=\frac{a B \cos (c+d x) \sin (c+d x)}{2 d}+(a (B+C)) \int \cos (c+d x) \, dx+\frac{1}{2} (a (B+2 C)) \int 1 \, dx\\ &=\frac{1}{2} a (B+2 C) x+\frac{a (B+C) \sin (c+d x)}{d}+\frac{a B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0940167, size = 44, normalized size = 0.94 \[ \frac{a (4 (B+C) \sin (c+d x)+B \sin (2 (c+d x))+2 B c+2 B d x+4 C d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.077, size = 57, normalized size = 1.2 \begin{align*}{\frac{1}{d} \left ( Ba \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +Ba\sin \left ( dx+c \right ) +aC\sin \left ( dx+c \right ) +aC \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.935813, size = 74, normalized size = 1.57 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a + 4 \,{\left (d x + c\right )} C a + 4 \, B a \sin \left (d x + c\right ) + 4 \, C a \sin \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.478606, size = 99, normalized size = 2.11 \begin{align*} \frac{{\left (B + 2 \, C\right )} a d x +{\left (B a \cos \left (d x + c\right ) + 2 \,{\left (B + C\right )} a\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.14786, size = 126, normalized size = 2.68 \begin{align*} \frac{{\left (B a + 2 \, C a\right )}{\left (d x + c\right )} + \frac{2 \,{\left (B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2 \, C a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 3 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2 \, C a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]